define("dojo/_base/declare esri/layers/TiledMapServiceLayer esri/layers/TileInfo esri/geometry/Extent esri/SpatialReference".split(" "),
    function (C, Q, T, E, S) {
        return C(Q, {
            declaredClass: "tdtlib.ZjTdtLayer_Vector",
            constructor: function () {
                this.spatialReference = new S({wkid: 4490});
                this.initialExtent = (this.fullExtent = new E(-180, -90, 180, 90, this.spatialReference));
                this.tileInfo = new T({
                    "dpi": 90.71428571428571,
                    "cols": 256,
                    "rows": 256,
                    "format": 'image/jpgpng',
                    "compressionQuality": 0,
                    "origin": {
                        "x": -180,
                        "y": 90
                    },
                    "spatialReference": new S({
                        "wkid": 4490
                    }),
                    "lods": [
                        // {
                        //     "level": 0,
                        //     "scale": 558455283.0133331,
                        //     "resolution": 1.40625
                        // }, {
                        //     "level": 1,
                        //     "scale": 279227641.50666654,
                        //     "resolution": 0.703125
                        // }, {
                        //     "level": 2,
                        //     "scale": 139613820.75333327,
                        //     "resolution": 0.3515625
                        // }, {
                        //     "level": 3,
                        //     "scale": 69806910.37666664,
                        //     "resolution": 0.17578125
                        // }, {
                        //     "level": 4,
                        //     "scale": 34903455.18833332,
                        //     "resolution": 0.087890625
                        // },
                       // {
                       //     "level": 5,
                       //     "scale": 17451727.59416666,
                       //     "resolution": 0.0439453125
                       // }, {
                       //     "level": 6,
                       //     "scale": 8725863.79708333,
                       //     "resolution": 0.02197265625
                       // },
                        {
                            "level": 7,
                            "scale": 4362931.898541665,
                            "resolution": 0.010986328125
                        }, {
                            "level": 8,
                            "scale": 2181465.949270837,
                            "resolution": 0.0054931640625
                        }, {
                            "level": 9,
                            "scale": 1090732.9746354138,
                            "resolution": 0.00274658203125
                        }, {
                            "level": 10,
                            "scale": 545366.4873177079,
                            "resolution": 0.001373291015625
                        }, {
                            "level": 11,
                            "scale": 272683.2436588544,
                            "resolution": 0.0006866455078125
                        }, {
                            "level": 12,
                            "scale": 136341.62182942673,
                            "resolution": 0.00034332275390625
                        }, {
                            "level": 13,
                            "scale": 68170.81091471355,
                            "resolution": 0.000171661376953125
                        }, {
                            "level": 14,
                            "scale": 34085.405457356734,
                            "resolution": 8.58306884765625e-005
                        }, {
                            "level": 15,
                            "scale": 17042.702728678414,
                            "resolution": 4.291534423828125e-005
                        }, {
                            "level": 16,
                            "scale": 8521.351364339187,
                            "resolution": 2.1457672119140625e-005
                        }, {
                            "level": 17,
                            "scale": 4260.675682169598,
                            "resolution": 1.0728836059570313e-005
                        }, {
                            "level": 18,
                            "scale": 2130.3378410847945,
                            "resolution": 5.3644180297851563e-006
                        },
                        // {
                        //     "level": 19,
                        //     "scale": 1065.168920542402,
                        //     "resolution": 2.68220901489257815e-006
                        // }, {
                        //     "level": 20,
                        //     "scale": 532.5844602711991,
                        //     "resolution": 1.341104507446289e-006
                        // }
                    ]
                });
                this.loaded = true;
                this.onLoad(this);
            },

            getTileUrl: function (level, row, col) {
                var url=`http://srv.zjditu.cn/ZJDOMANNO_2D/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=imgmap_lab&STYLE=default&TILEMATRIXSET=default028mm&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}&FORMAT=image%2Fjpgpng`
               // var url = `http://ditu.zj.gov.cn//services/wmts/emap_lab?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=emap_lab&STYLE=default&TILEMATRIXSET=default028mm&TILEMATRIX=${level}&TILEROW=${row}&TILECOL=${col}&FORMAT=image%2Fjpgpng`
                return url
            }
        });

    }
);